package com.ruoyi.erp.common.enums;

/**
 * @author qiuwencong
 * @Date 2022/1/12 13:56
 * @Package com.ruoyi.erp.common.enums
 * @Description
 */
public enum OrderProductStatus {

    UNFINISHDE("0", "未完成"),

    FINISHDE("1", "完成");

    private final String key;
    private final String value;

    OrderProductStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return this.key;
    }

    public String getValue() {
        return this.value;
    }

    public static String getValueByKey(String key) {
        for (OrderProductStatus orderProductStatus : OrderProductStatus.values()) {
            if (orderProductStatus.getKey().equals(key)) {
                return orderProductStatus.getValue();
            }
        }
        return null;
    }
}
